package org.example.common

import java.sql.{Connection, DriverManager}

object DButils {


  val username = "root"
  val pwd = "tieyin20020103"

  val url = "jdbc:mysql://localhost:3306/world?serverTimezone=UTC&characterEncoding=utf8"
  classOf[com.mysql.cj.jdbc.Driver]

  def getConn(): Connection = {
    DriverManager.getConnection(url, username, pwd)
  }

  def closeCon(con:Connection):Unit = {
    con.close()
  }

}
